<!DOCTYPE html>
<html lang='en'>

<head>
    <meta charset='UTF-8'>
    <meta http-equiv='X-UA-Compatible' content='IE=edge'>
    <meta name='viewport' content='width=device-width, initial-scale=1.0'>
    <title>Document</title>
    <script src='./vue.global.js'></script>
</head>

<body>
    <div id='app'></div>

    <!-- 
    mixin的生命周期与组件的生命周期会合并
     -->
    <script>
        const myMixin = {
            created() {
                console.log('mixin钩子被调用')
            }
        }

        const app = Vue.createApp({
            mixins: [myMixin],
            created() {
                console.log('组件钩子被调用')
            }
        })
        
        const vm = app.mount('#app')
    </script>
</body>

</html>